package net.noday.demo.spring;

import net.noday.demo.service.ITestService;

import org.junit.BeforeClass;
import org.junit.Test;
import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class AOPTest2 {

	@Test
	public void instanceSpring() {
		AbstractApplicationContext ctx = new ClassPathXmlApplicationContext("spring-xml.xml");
		ITestService ts = (ITestService) ctx.getBean("testService");
		ts.save("����");
//		System.out.println(ts);
//		ITestService ts1 = (ITestService) ctx.getBean("testService");
//		System.out.println(ts1);
		ctx.close();
		
	}
	
	@BeforeClass
	public static void  setUpBeforeClass() throws Exception {
		
	}
}
